.class final Lcom/mobisage/android/u;
.super Lcom/mobisage/android/O;
.source "SourceFile"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/mobisage/android/u$a;
    }
.end annotation


# instance fields
.field private g:Lcom/mobisage/android/u$a;


# direct methods
.method protected constructor <init>(Landroid/os/Handler;)V
    .locals 2
    .parameter

    .prologue
    .line 22
    invoke-direct {p0, p1}, Lcom/mobisage/android/O;-><init>(Landroid/os/Handler;)V

    .line 23
    const/16 v0, 0xbb8

    iput v0, p0, Lcom/mobisage/android/u;->c:I

    .line 24
    new-instance v0, Lcom/mobisage/android/u$a;

    const/4 v1, 0x0

    invoke-direct {v0, p0, v1}, Lcom/mobisage/android/u$a;-><init>(Lcom/mobisage/android/u;B)V

    iput-object v0, p0, Lcom/mobisage/android/u;->g:Lcom/mobisage/android/u$a;

    .line 25
    return-void
.end method


# virtual methods
.method public final a(Landroid/os/Message;)V
    .locals 6
    .parameter

    .prologue
    .line 31
    iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    instance-of v0, v0, Lcom/mobisage/android/b;

    if-eqz v0, :cond_2

    .line 32
    iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v0, Lcom/mobisage/android/b;

    iget-object v1, p0, Lcom/mobisage/android/u;->e:Ljava/util/concurrent/ConcurrentHashMap;

    iget-object v2, v0, Lcom/mobisage/android/b;->b:Ljava/util/UUID;

    invoke-virtual {v1, v2, v0}, Ljava/util/concurrent/ConcurrentHashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    new-instance v1, Lcom/mobisage/android/v;

    invoke-direct {v1}, Lcom/mobisage/android/v;-><init>()V

    iget-object v2, p0, Lcom/mobisage/android/u;->g:Lcom/mobisage/android/u$a;

    iput-object v2, v1, Lcom/mobisage/android/v;->callback:Lcom/mobisage/android/IMobiSageMessageCallback;

    iget-object v2, v0, Lcom/mobisage/android/b;->c:Landroid/os/Bundle;

    const-string v3, "key"

    invoke-virtual {v2, v3}, Landroid/os/Bundle;->containsKey(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_0

    iget-object v2, v1, Lcom/mobisage/android/v;->params:Landroid/os/Bundle;

    const-string v3, "key"

    iget-object v4, v0, Lcom/mobisage/android/b;->c:Landroid/os/Bundle;

    const-string v5, "key"

    invoke-virtual {v4, v5}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v2, v3, v4}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    :cond_0
    iget-object v2, v0, Lcom/mobisage/android/b;->f:Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-virtual {v2, v1}, Ljava/util/concurrent/LinkedBlockingQueue;->add(Ljava/lang/Object;)Z

    iget-object v2, p0, Lcom/mobisage/android/u;->f:Ljava/util/concurrent/ConcurrentHashMap;

    iget-object v3, v1, Lcom/mobisage/android/v;->c:Ljava/util/UUID;

    iget-object v0, v0, Lcom/mobisage/android/b;->b:Ljava/util/UUID;

    invoke-virtual {v2, v3, v0}, Ljava/util/concurrent/ConcurrentHashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    invoke-static {}, Lcom/mobisage/android/H;->a()Lcom/mobisage/android/H;

    move-result-object v0

    invoke-virtual {v0, v1}, Lcom/mobisage/android/H;->a(Lcom/mobisage/android/MobiSageMessage;)V

    .line 35
    :cond_1
    :goto_0
    return-void

    .line 33
    :cond_2
    iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    instance-of v0, v0, Lcom/mobisage/android/v;

    if-eqz v0, :cond_1

    .line 34
    iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v0, Lcom/mobisage/android/v;

    iget-object v1, p0, Lcom/mobisage/android/u;->f:Ljava/util/concurrent/ConcurrentHashMap;

    iget-object v2, v0, Lcom/mobisage/android/v;->c:Ljava/util/UUID;

    invoke-virtual {v1, v2}, Ljava/util/concurrent/ConcurrentHashMap;->containsKey(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_1

    iget-object v1, p0, Lcom/mobisage/android/u;->f:Ljava/util/concurrent/ConcurrentHashMap;

    iget-object v2, v0, Lcom/mobisage/android/v;->c:Ljava/util/UUID;

    invoke-virtual {v1, v2}, Ljava/util/concurrent/ConcurrentHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/util/UUID;

    iget-object v2, p0, Lcom/mobisage/android/u;->f:Ljava/util/concurrent/ConcurrentHashMap;

    iget-object v3, v0, Lcom/mobisage/android/v;->c:Ljava/util/UUID;

    invoke-virtual {v2, v3}, Ljava/util/concurrent/ConcurrentHashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    iget-object v2, p0, Lcom/mobisage/android/u;->e:Ljava/util/concurrent/ConcurrentHashMap;

    invoke-virtual {v2, v1}, Ljava/util/concurrent/ConcurrentHashMap;->containsKey(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_1

    iget-object v2, p0, Lcom/mobisage/android/u;->e:Ljava/util/concurrent/ConcurrentHashMap;

    invoke-virtual {v2, v1}, Ljava/util/concurrent/ConcurrentHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/mobisage/android/b;

    iget-object v2, v1, Lcom/mobisage/android/b;->f:Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-virtual {v2, v0}, Ljava/util/concurrent/LinkedBlockingQueue;->remove(Ljava/lang/Object;)Z

    iget-object v2, v0, Lcom/mobisage/android/v;->result:Landroid/os/Bundle;

    const-string v3, "StatusCode"

    invoke-virtual {v2, v3}, Landroid/os/Bundle;->getInt(Ljava/lang/String;)I

    move-result v2

    const/16 v3, 0xc8

    if-eq v2, v3, :cond_3

    const/16 v3, 0x12e

    if-eq v2, v3, :cond_3

    invoke-virtual {p0, v1}, Lcom/mobisage/android/u;->c(Lcom/mobisage/android/b;)V

    goto :goto_0

    :cond_3
    iget-object v0, v0, Lcom/mobisage/android/v;->result:Landroid/os/Bundle;

    const-string v2, "ResponseBody"

    invoke-virtual {v0, v2}, Landroid/os/Bundle;->getByteArray(Ljava/lang/String;)[B

    move-result-object v0

    const-string v2, "UTF-8"

    invoke-static {v0, v2}, Lorg/apache/http/util/EncodingUtils;->getString([BLjava/lang/String;)Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_4

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v2

    if-nez v2, :cond_5

    :cond_4
    invoke-virtual {p0, v1}, Lcom/mobisage/android/u;->c(Lcom/mobisage/android/b;)V

    goto :goto_0

    :cond_5
    iget-object v2, v1, Lcom/mobisage/android/b;->d:Landroid/os/Bundle;

    const-string v3, "ResponseBody"

    invoke-virtual {v2, v3, v0}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual {v1}, Lcom/mobisage/android/b;->a()Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/mobisage/android/u;->e:Ljava/util/concurrent/ConcurrentHashMap;

    iget-object v2, v1, Lcom/mobisage/android/b;->b:Ljava/util/UUID;

    invoke-virtual {v0, v2}, Ljava/util/concurrent/ConcurrentHashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    iget-object v0, v1, Lcom/mobisage/android/b;->g:Lcom/mobisage/android/a;

    if-eqz v0, :cond_1

    iget-object v0, v1, Lcom/mobisage/android/b;->g:Lcom/mobisage/android/a;

    invoke-interface {v0, v1}, Lcom/mobisage/android/a;->a(Lcom/mobisage/android/b;)V

    goto/16 :goto_0
.end method
